package demo;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class HelloWorld {
    public static void main(String[] args) throws Exception {
        FileOutputStream fos = new FileOutputStream("fos.dat");
        String line = "一袋米要扛几楼！";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = "分支上写入的内容！";

        fos.write((line.getBytes(StandardCharsets.UTF_8)));
        line = " 主线上新添加了一句写入内容 ";
        fos.write(line.getBytes(StandardCharsets.UTF_8));
        line = "分支上又添加了一句写入操作!!!!！";

        System.out.println("写出完毕");
        fos.close();
    }
}
